﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace TN_CMS.Domain.Entities
{
    public class NewsGroup
    {
        public NewsGroup()
        {
            News = new HashSet<News>();
        }

        [Key()]
        [ScaffoldColumn(false)]
        public int Id { get; set; }

        [UIHint("TNText")]
        [Required]
        public string Name { get; set; }

        [UIHint("TNText")]
        [Required]
        public string Key { get; set; }

        [UIHint("TNText")]
        [Required]
        public string Description { get; set; }

        [UIHint("TNDisplayText")]
        [ScaffoldColumn(false)]
        [Display(Name = "Total Views")]
        public int TotalViews { get; set; }

        [UIHint("TNDisplayText")]
        [Display(Name = "Created On ")]
        public DateTime CreatedOn { get; set; }

        [ScaffoldColumn(false)]
        public int CreatedBy { get; set; }
        public virtual SysAdmin CreatedByAdmin { get; set; }

        [UIHint("TNDisplayText")]
        [Display(Name = "Updated On")]
        [ScaffoldColumn(false)]
        public DateTime? UpdatedOn { get; set; }

        [ScaffoldColumn(false)]
        public int? UpdatedBy { get; set; }
        public virtual SysAdmin UpdatedByAdmin { get; set; }

        [UIHint("TNCheckBox")]
        [Display(Name = "Is Active")]
        public bool IsActive { get; set; }

        public virtual ICollection<News> News { get; set; }

    }
}
